package com.test.mooan.labama.bean_boom.user_info_boom;

import com.google.gson.Gson;
import com.test.mooan.labama.utils_boom.Stringutil_boom;

import org.json.JSONObject;

import java.util.ArrayList;
import java.util.LinkedHashMap;


public class LnLimitInfo_boom {

    private static class Inner {
        private static LnLimitInfo_boom instance = new LnLimitInfo_boom();
    }

    private LnLimitInfo_boom(){}

    public static LnLimitInfo_boom getInstance(){
        return Inner.instance;
    }

    private String newUserFlag;
    private ArrayList<LinkedHashMap<String,String>> limit;

    public static void parse(JSONObject objJson){
        Inner.instance = new Gson().fromJson(objJson.toString(), LnLimitInfo_boom.class);
    }

    public String gLimitAmount(){
        if (limit == null||limit.size()==0) return "";
        return Stringutil_boom.getSafeString(limit.get(0).get("amount"));
    }

    public String gLimitIncreasedAmount1(){
        if (limit == null||limit.size()==0) return "";
        return limit.get(0).get("increasedAmount1");
    }

    public String gLimitIncreasedAmount2(){
        if (limit == null||limit.size()==0) return "";
        return limit.get(0).get("increasedAmount2");
    }

    public String gCurrency() {
        if (limit == null||limit.size()==0) return "";
        return Stringutil_boom.getSafeString(limit.get(0).get("currency"));
    }
}
